import request from "@/utils/request";

// 立项查询
export function approvalList(data) {
  return request({
    url: "/project/transfer/lists",
    method: "get",
    params: data,
  });
}

// 立项编辑
export function approvalEdit(data) {
  return request({
    url: "/project/transfer/update",
    method: "post",
    data,
  });
}

// 立项详情提交
export function approvalDetailAdd(data){
  return request({
    url: "/project/transfer/updates",
    method: "post",
    data,
  });
}

// 立项删除
export function approvalDel(proId) {
  return request({
    url: "/project/transfer/delete/" + proId,
    method: "delete"
  });
}

// 立项撤回
export function withdrawApi(data){
  return request({
    url:"/project/transfer/delproject",
    method:"post",
    data

  })
}

// 根据ID查询单条数据
export function approvalQuery(data) {
  return request({
    url: "/project/transfer/list",
    method: "get",
    params: data,
  });
}

// 转立项ID查询单条数据
export function approvalQueryApi(data) {
  return request({
    url: "/project/transfer/byId",
    method: "get",
    params: data,
  });
}


// 意见发布
export function opinionRelease(data) {
  return request({
    url: "/project/transfer/addcomments",
    method: "post",
    data
  })
}

// 意见查询
export function opinionInquiry(data) {
  return request({
    url: "/project/transfer/selectcomments",
    method: "get",
    params: data
  })
}

// 转立项添加
export function approvalAdd (data,id) {
  return request({
    url: "/project/transfer/insert/" + id,
    method: "post",
    data
  })
}

// 立项添加
export function approval(data){
  return request({
    url:'/project/transfer/projectinsert',
    method:'post',
    data
  })
}

// 部门下拉框
export function divisionDown(data) {
  return request({
    url: "/system/dept/list",
    method: "get",
    params: data
  })
}

// 行业下拉框
export function industryDownApi (data) {
  return request({
    url: "/system/industry/list",
    method: "get",
    params: data
  })
}
